﻿@model IEnumerable<PerformanceAssessment.Models.StatusReportModel>

@{
    ViewBag.Title = "Assessment Status Report";
}
@section Head
{
    <style type="text/css">
        .rep_column
        {
            text-align:center;
        }
    </style>
}

<h2>Performance Assessment Status Report</h2>

@using (Html.BeginForm("AssessmentStatusReport", "Reports", FormMethod.Get))
{  
    <p>
        @Html.Label("Assessment Period:") @Html.DropDownList("periodId", "") 
        <input type="submit" value="Filter"/>
    </p>
}

<table>
    <tr>
        <th>
            Employee
        </th>
        <th>
            Contractor ID
        </th>
        <th>
            Auto Evaluation
        </th>
        <th>
            Manager Evaluation
        </th>
        <th>
            PA Status
        </th>
        <th>
            Evaluation
        </th>
        <th>
            Average
        </th>
    </tr>

@if (Model != null)
{
foreach (var item in Model)
{
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Employee)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.ContractorId)
        </td>
        <td style="background-color:#C4D79B;">
            @Html.DisplayFor(modelItem => item.Autoevaluation)
        </td>
        <td style="background-color:#C4D79B;">
            @Html.DisplayFor(modelItem => item.ManagerEvaluation)
        </td>
        <td style="background-color:#C4D79B;">
            @Html.DisplayFor(modelItem => item.PADone)
        </td>
        @if (item.Evaluation == 0)
            {
                <td class="rep_column" style="background-color:#D9D9D9;color:#80809F;">
                    @Html.Label(item.Evaluation.ToString())
                </td>
            }
            else
            {
                if (item.Evaluation < 3)
                {
                    <td class="rep_column" style="background-color:#FFC7CE;color:Red;">
                        @item.Evaluation.ToString("0.00")
                    </td>
                }
                else
                {
                    if (item.Evaluation == 3)
                    {
                        <td class="rep_column" style="background-color:#FFEB9C;color:#9C7D57;">
                            @item.Evaluation.ToString("0.00")
                        </td>
                    }
                    else
                    {
                        <td class="rep_column" style="background-color:#C6EFCE;color:#006100;">
                            @item.Evaluation.ToString("0.00")
                        </td>
                    }
                }
            }
        <td class="rep_column">
            @item.Average.ToString("0.00")
        </td>
    </tr>
}
}
</table>
<p>    
    @Html.ActionLink("Back to List", "Index")
</p>
